home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_04
/
saks
/
lns1b.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-09
|
547b
|
39 lines
----------
Listing 6 - class definition for lns using a pair of pointers
//
// lns1b.h - line number sequence interface
//
#ifndef LNS_H_INCLUDED
#define LNS_H_INCLUDED
class lns
{
public:
lns(unsigned n);
~lns();
void add(unsigned n);
void print();
private:
class node;
node *first, *last;
};
class lns::node
{
public:
node(unsigned n);
unsigned number;
node *next;
};
inline lns::node::node(unsigned n)
: number(n), next(0)
{
}
#endif